#include("/common/_body.html")

#define page_content()
<div class="row">
	<div class="col-sm-12 search-collapse">
		<form id="sff" class="form-inline">
			<div class="form-group">
				<label class="control-label">操作描述</label>
				<input type="text" class="form-control stext" name="log.log_desc">
			</div>
			<div class="form-group">
				<label class="control-label">操作用户</label>
				<input type="text" class="form-control stext" name="log.create_user">
			</div>
			<div class="form-group">
				<label class="control-label">状态</label>
				<select class="easyui-combobox stext" name="log.status">
					#dic_for("log_status")
	                <option value="#(item_code)" 
	                #if(item_code.toInt() == user.status??10) selected #end
	                >#(item_value)</option>
	             	#end
	             </select>
			</div>
			<div class="form-group">
				<label class="control-label">操作时间</label>
				<input type="text" class="easyui-datebox stext" data-options="panelWidth:200,panelHeight:240" name="start_time">
			</div>
			<div class="form-group">
				<a class="btn btn-success btn-sm no-border btn-round" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
			    <a class="btn btn-warning btn-sm no-border btn-round" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
			</div>
		</form>
	</div>
	<div id="toolbar">
		#auth_has("log_export")
        <a class="btn btn-success btn-xs no-border" onclick="$.table.export()">
            <i class="fa fa-download"></i> 导出
        </a>
        #end
    </div>
</div>
<div class="row">
	<div class="col-sm-12 select-table">
	    <table id="ey_grid">
	    	<thead>
	            <tr>
	                <th data-options="field:'id',hidden:true">ID</th>
					<th data-options="field:'create_user',width:40,sortable:true">操作用户</th>
					<th data-options="field:'log_ip',width:40,sortable:true">操作IP</th>
	                <th data-options="field:'ip_location',width:40">IP归属地</th>
	                <th data-options="field:'log_url',width:60">操作URL</th>
	                <th data-options="field:'log_op',width:50,sortable:true,hidden:true,formatter: function(value,row,index){
	                	return dics['log_op'][value]
	                }
	                ">类型</th>
	                <th data-options="field:'status',width:30,sortable:true,formatter: function(value,row,index){
	                	return dics['log_status'][value]
	                }
	                ">状态</th>
	                <th data-options="field:'log_desc',width:50">操作描述</th>
	                <th data-options="field:'create_time',width:40,sortable:true,formatter: function(value,row,index){
	                	return $.common.time(value)
	                }
	                ">操作时间</th>
	            </tr>
	        </thead>
	    </table>
	</div>
	<div id="dlg"></div> 
</div>
#end

#define js()
<script>
	// js中如果用到权限和字典项目，先定义这两个变量，然后获取。
	var dics = #dic_json("log_op","log_status");
</script>
<script src="#(path)/js/templates/pdc/log_list.js"></script>
#end